package com.jic.member.enums;


/**
 * @author MJ
 * @date: 2020/06/08
 */
public enum CardPeriodTypeEnum {

    GENERATE_TYPE(1, "生成"),
    BINDING_TYPE(2, "绑定"),
    UNTIE_TYPE(3, "解绑");

    private Integer type;

    private String message;

    CardPeriodTypeEnum(Integer type, String message){
        this.type = type;
        this.message = message;
    }

    public CardPeriodTypeEnum getByType(Integer type){
        CardPeriodTypeEnum[] values = CardPeriodTypeEnum.values();
        for(CardPeriodTypeEnum value : values){
            if(value.getType().equals(type)){
                return value;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
